#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QStackedLayout>
#include "envdispserver.h"
#include "qlabel.h"
#include "swebengineview.h"
#include <QDebug>
#include <QString>
#include <QTimer>

#include "HCNetSDK.h"
#include <Windows.h>

namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
    Q_OBJECT
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

    void addString();

protected:
    void resizeEvent(QResizeEvent *);
private slots:
    void on_login_clicked();

    void on_start_play_clicked();

    void on_stop_play_clicked();

    void on_pushButton_clicked();

    void on_pushButton_2_clicked();

    void on_pushButton_3_clicked();

    void on_pushButton_4_clicked();

private:
    Ui::MainWindow *ui;
    SWebEngineView* view;
    QTimer* t;

    long userID;
    NET_DVR_DEVICEINFO_V30 DeviceInfoTmp;
    long IRealPlayHandle;
    QLabel *label1;

    QString strWebUrl;
    QRect carStopRect;
    void loadSysIni();

    void showCarStopRect();


    int init_haikang_sdk();
    int init_web_view();
    int init_pic_view();
    int init_video_draw();

    void close_hide_all();
Q_SIGNALS:
    void videoDrawSignal(std::vector<QRect> rects, std::vector<QColor> colors);

public Q_SLOTS:
    void videoDrawSlot(std::vector<QRect> rects, std::vector<QColor> colors);


};
#endif // MAINWINDOW_H
